/*
** Thunder Cross MMU Example, to be merged into the generic K7232 driver later
*/

#include "smse2kincludes.h"
#include "TXMMU.h"

UINT8 CTXMMU::Read8(unsigned long offset) {
	if (offset == 0xc000) return ym->Read(0);
	if (offset == 0xc001) return ym->Read(1);
	return memspace[offset & 0xffff];
}

void CTXMMU::Write8(UINT64 offset, UINT8 data) {
	if (offset < 0x8000) Msg("WARNING: Write into ROM! %04X %02X\n",offset,data);
	
	if (offset == 0xa000) return;

	if (offset == 0xc000 || offset == 0xc001) ym->Write(offset & 1,data);

	memspace[offset & 0xffff] = data;
}